package com.huatai.bi.controller;

import com.huatai.bi.entity.DatabaseEntity;
import com.huatai.bi.service.DatabaseService;
import com.huatai.common.api.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api(value = "数据源连接基本信息",tags = "数据源连接基本信息")
@RequestMapping("/database")
public class DatabaseController {

    @Autowired
    DatabaseService service;

    @PostMapping("/list")
    @ApiOperation(value = "获取列表")
    public R<List<DatabaseEntity>> list(){
        return R.data(service.list());
    }
}
